Transform coding and decoding of video data usually includes what is called entropy coding. For compression, the pixel information of a picture, e.g., of a residual picture after motion compensated prediction, or of a picture for intra-coding is divided into blocks. The blocks are transformed, e.g., by a discrete cosine transform (DCT) or a similar transform, and the resulting transform coefficients are quantized. The quantized transform coefficients are ordered, e.g., from low to higher frequencies along a path in the two dimensional transform domain. The ordered series of quantized transform coefficients is then losslessly encoded by an entropy coding method. One popular entropy coding method is variable length coding in which one or more events, representing one or more quantized coefficients of properties thereof are encoded by codewords such that events that are more likely-to-occur are more likely to be encoded by codewords that are shorter than are events that are less likely-to-occur. Variable length coding (VLC), due to its nice tradeoff in efficiency and simplicity, has been widely used in entropy coding, particularly when the codec is desired to have low computational complexity.
Coding methods disclosed in U.S. Ser. No. 12/016,441 include a two-way position and amplitude coding process for a series of quantized coefficients. Positions of non-zero quantized transform coefficients are ordered, e.g., in a forward zigzag scan order and by multiple VLC tables with adaptive table switch based on the context. By context is meant one or more items of information determinable from previously encoded information and useful in predicting behavior, e.g., information determined from previously coded coefficients. Amplitudes of the quantized coefficients, on the other hand, are coded in an order reverse to the forward zigzag scan order and are regrouped into sub-sequences according to their adjacency to zeros. These sub-sequences are coded with different respective (multidimensional) VLC mappings that have different dimensionality.
Coding methods disclosed in U.S. Ser. No. 12/030,821 include encoding the run-length of each cluster of non-zero-valued quantized coefficients and the run-length of each cluster's preceding zero coefficients together as a pair, in combination with a parameter that indicates the number of trailing coefficients in that non-zero cluster that have a amplitude of 1. Remaining amplitudes are coded separately by a one-dimensional VLC mapping, e.g., a code table.
Coding methods disclosed in Ser. No. 12/336,364 include jointly encoding coefficient positions with the run lengths of coefficients having trailing amplitude 1, and coding remaining amplitudes of each cluster by one-dimensional (1D) VLC. In addition, the methods take into account previously coded neighboring coefficient blocks in coding a particular block. Multiple VLC code mappings, e.g., code tables are used, with context-based table switch.
The inventors investigated modifying the quantization locally in order to reduce the number of clusters, and thus reduce the number of bits required to encode the transform coefficients of an image block without significantly affecting the image quality.